<?php
// +----------------------------------------------------------------------
// | 麦沃德科技赋能开发者，助力中小企业发展
// +----------------------------------------------------------------------
// | Copyright (c) 2017～2024  www.wdadmin.cn    All rights reserved.
// +----------------------------------------------------------------------
// | Wdadmin系统产品软件并不是自由软件，不加密，并不代表开源，未经许可不可自由转售和商用
// +----------------------------------------------------------------------
// | Author: MY WORLD Team <bd@maiwd.cn>   www.wdadmin.cn
// +----------------------------------------------------------------------
/**
 * Class SoundRecordingConfig
 * Desc  行程录音配置
 * Create on 2025/4/30 8:46
 * Create by wangyafang
 */

namespace app\api\controller\wddj;


use app\api\model\wddj\Config;
use app\common\controller\Api;

class SoundRecordingConfig  extends Api
{
    protected $noNeedLogin = ['content'];
    protected $noNeedRight = ['*'];

    public function _initialize()
    {
        parent::_initialize();
    }

    /**
     * Desc 行程录音介绍和协议
     * Create on 2025/4/29 18:01
     * Create by wangyafang
     */
    public function content()
    {
        if(!$this->request->isGet()) {
            $this->error('请求类型错误');
        }
        $type = $this->request->get('type');
        if (empty($type)) {
            $this->error('参数错误');
        }
        if ($type == 1) {
            $field = 'sound_recording_introduce';
        } else {
            $field = 'sound_recording_information_processing_protocol';
        }

        $content = (new Config())->value($field);
        $this->success('请求成功',array('content'=>$content));
    }
}



 